import axios from 'axios';
import qs from 'qs';
const baseURL = "http://localhost"
// 登录请求⽅法
const loginRequest = (method, url, params) => {
    return axios({
        method: method,
        url: baseURL + url,
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded',
        },
        data: qs.stringify(params)
    }).then(res => res.data);
};
// 通⽤公⽤⽅法
const request = (method, url, params) => {
    return axios({
        method: method,
        url: baseURL + url,
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
        data: qs.stringify(params)
    }).then(res => res.data);
};
export {
    loginRequest,
    request
}